package com.codepilot.server.converter;

import com.codepilot.server.model.entity.DifficultyDistrb;
import com.codepilot.server.model.entity.TopicDistrb;
import com.codepilot.server.model.vo.DifficultyDistrbVO;
import com.codepilot.server.model.vo.TopicDistrbVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import com.codepilot.server.model.dto.StatsDTO;
import com.codepilot.server.model.entity.Statistics;
import com.codepilot.server.model.vo.StatsVO;

@Mapper
public interface StatsConverter {

    StatsConverter INSTANCE = Mappers.getMapper(StatsConverter.class);

    @Mapping(target = "total", ignore = true)
    StatsDTO statistics2StatsDTO(Statistics statistics);

    StatsVO statsDTO2StatsVO(StatsDTO statsDTO);

    DifficultyDistrbVO difficulty2VO(DifficultyDistrb difficultyDistrb);

    TopicDistrbVO topic2VO(TopicDistrb topicDistrb);

}
